home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 January
/
PCWorld_2007-01_cd.bin
/
v cisle
/
autoit
/
autoit-v3.2.0.1-setup.exe
/
Examples
/
Helpfile
/
_ArraySearch.au3
< prev
next >
Wrap
Text File
|
2006-06-17
|
501b
|
19 lines
#Include<Array.au3>
Dim $Array[6]
$Array[0] = "String0"
$Array[1] = "String1"
$Array[2] = "String2"
$Array[3] = "String3"
$Array[4] = "String4"
$Array[5] = "String5"
$Input = InputBox("ArraySearch Demo", "String To Find?")
If @error Then Exit
$Pos = _ArraySearch ($Array, $Input)
Select
Case $Pos = -1
MsgBox(0, "Not Found", '"' & $Input & '" was not found in the array.')
Case Else
MsgBox(0, "Found", '"' & $Input & '" was found in the array at pos ' & $Pos & ".")
EndSelect